<?php

use think\facade\Route;

Route::group(function () {
    Route::post('register', 'v1.user/register'); //注册
    Route::post('login', 'v1.user/login');  //登录
    Route::post('logout', 'v1.user/Logout');  //登录
    Route::post('banner', 'v1.article/banner'); //首页banner图
    Route::post('special_type', 'v1.article/SpecialType'); //专区分类
    Route::post('cate_list', 'v1.goods/CateList'); //分类
    Route::post('goods_list', 'v1.goods/GoodsList'); //商品列表
    Route::post('special_goods_list', 'v1.goods/SpecialGoodsList'); //专区商品列表
    Route::post('goods_details', 'v1.goods/GoodsDetails')->middleware(\app\middleware\GoodsDeteils::class); //商品详情
    Route::post('welfare_list', 'v1.welfare/WelfareList'); //公益环保列表
    Route::post('welfare_log', 'v1.welfare/WelfareLOG'); //公益环保日志
    Route::post('welfare_schedule', 'v1.welfare/WelfareSchedule'); //公益进度
    Route::post('donate', 'v1.welfare/Donate'); //公益环保捐赠
    Route::post('collect', 'v1.operate/Collect'); //收藏
    Route::post('collect_list', 'v1.operate/CollectList'); //收藏列表
    Route::post('collect_del', 'v1.operate/CollectDel'); //收藏列表
    Route::post('add_cart', 'v1.cart/addCart')->middleware(\app\middleware\GoodsDeteils::class); //添加购物车
    Route::post('cart_list', 'v1.cart/cartList'); //购物车列表
    Route::post('cart_del', 'v1.cart/cartDel'); //清除购物车
    Route::post('get_area', 'v1.address/getArea'); //收货地址
    Route::post('address_list', 'v1.address/AddressList'); //收货地址
    Route::post('address_modify', 'v1.address/addressModify'); //添加收货地址
    Route::post('pay_msg', 'v1.order/payMsg'); //下单信息
    Route::post('logistics', 'v1.order/Logistics'); //物流信息
    Route::post('order_address', 'v1.order/OrderAddress'); //修改代付款地址
    Route::post('pay', 'v1.order/Pay')->middleware(\app\middleware\OrderCheck::class); //下单
    Route::post('spike', 'v1.order/Spike')->middleware(\app\middleware\SpikeCheck::class); //秒杀
    Route::post('spike_list', 'v1.goods/SpikeList'); //秒杀列表
    Route::post('sign', 'v1.activity/sign');//签到
    Route::post('sign_msg', 'v1.activity/signMsg');//签到信息
    Route::post('real_name', 'v1.user/realName');//完成实名
    Route::post('user_info', 'v1.user/UserInfo');//用户信息
    Route::post('money_log', 'v1.user/MoneyLog');//积分日志
    Route::post('change_log', 'v1.user/ChangeLog');//余额日志
    Route::post('order_list', 'v1.order/OrderList');//积分日志
    Route::post('order_modify', 'v1.order/OrderModify');//确认收货,申请退款
    Route::post('user_list', 'v1.user/UserList');//好友列表
    Route::post('user_modify', 'v1.user/UserModify');//修改个人资料
    Route::post('my_welfare', 'v1.welfare/MyWelfare');//捐赠明细
    Route::post('lottery', 'v1.activity/lottery');//抽奖
    Route::post('lottery_log', 'v1.activity/LotteryLog');//抽奖日志
    Route::post('winner_log', 'v1.activity/WinnerLog');//中奖
    Route::post('lottery_log', 'v1.activity/LotteryLog');//抽奖列表
    Route::post('lottery_msg', 'v1.activity/LotteryMsg');//抽奖列表
    Route::post('hot_search', 'v1.article/HotSearch');//热门搜索
    Route::post('send_code', 'v1.user/SendCode')->middleware(\app\middleware\PhoneCheck::class);//发送短信
    Route::post('suggest', 'v1.article/suggest');//反馈
    Route::post('personal_center', 'v1.proxy/PersonalCenter');//B端个人中心
    Route::post('video_choose', 'v1.operate/VideoChoose');//观看视频
    Route::post('newbie_tutorial', 'v1.user/newbieTutorial');//完成新手引导

    Route::post('invite_url', 'v1.user/inviteUrl');//app版本信息
    Route::post('task_progress', 'v1.user/taskProgress');//视频操作
    Route::post('upload_image', 'v1.upload/uploadImage');//上传图片
    Route::post('logistics', 'v1.order/logistics');//物流信息
    Route::post('bank_list', 'v1.pay/BankList');//银行卡信息
    Route::post('bank_modify', 'v1.pay/BankModify');//银行卡操作
    Route::post('defray', 'v1.pay/payment')->middleware(\app\middleware\OrderCheck::class);//支付统一下单
    Route::post('withdrawalConfig', 'v1.withdrawal/withdrawalConfig');//提现配置
    Route::post('withdrawal', 'v1.withdrawal/Withdrawal');//提现
    Route::post('WithdrawalLog', 'v1.withdrawal/withdrawalLog');//提现
    Route::post('verifyPayPass', 'v1.user/verifyPayPass');//验证支付密码

})->middleware(\app\middleware\AuthToken::class);

Route::get('openApp', 'h5.User/openApp'); // 打开app
Route::get('verify', 'h5.User/verify'); // 打开app
Route::rule('video', 'v1.activity/video');//第三方视频回调
Route::post('lottery_images', 'v1.goods/LotteryImages');//app版本信息
Route::rule('aliResult', 'v1.pay/aliResult');//支付统一下单
Route::post('app', 'v1.article/app');//app版本信息